#include<bits/stdc++.h>
using namespace std;

int main(int argc, char const *argv[])
{
    string s;
    while(getline(cin,s)){
        vector<string> vec;
        stringstream ss;
        while(getline(ss,s,',')){
            vec.emplace_back(ss);
        }
        sort(vec.begin(),vec.end());
        if(vec.size()!=0){
            cout<<vec[0];
            for(int i=1;i<vec.size();++i){
                cout<<" "<<vec[i];
            }
            cout<<endl;
        }
    }
    return 0;
}